<?php
/**
 * @name /www/unit-tests/index.php
 * @author Michael Foss <michael@mikefoss.com>
 * @version 2011.03.26
 * 
 * This is the index page for unit-testing all classes & libraries.
 */

// Sets up configuration settings and includes libraries.
require_once('_ini.php');

function DefineHeader() {
?><style type="text/css">
  code {
    font: bold 10pt 'Courier New';
    color: #666;
    background-color: #CCC;
    border: 3px solid #666;
    padding: 4px 6px;
    margin: 10px 20px;
    display: block;
  }
  form, ul, ol {
    margin: 0px 20px;
  }
  a#Back {
    float: right;
    margin: 10px;
    padding: 4px 6px;
    border: 1px solid #666;
    background-color: #CCC;
  }
</style><?
}

/**
 * Defines page content.
 *
 */
function DefineContent() {
  $classes = array(
    'User',
    'Orphanage',
    'Item',
    'DonatedItem',
    'Donation',
    'NeededItem',
    'TripItem',
    'Notification',
    'ItemSearchWidget',
    'Trip'
  );
  ?>
<h1>Unit Testing</h1>
<a id="Back" href="../account.php">Back to Account</a>
<ul>
<?
  foreach ($classes as $class)
    println('<li><a href="' . $class . '.php">' . $class . '</a></li>');
?></ul>
<?
}

// Launches the page; without this, nothing happens.
require_once('_loader.php');